package com.tqjc.system.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tqjc.system.system.entity.SysMenuEntity;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tqjc.system.system.dao.SysRoleMenuDao;
import com.tqjc.system.system.entity.SysRoleMenuEntity;
import com.tqjc.system.system.service.SysRoleMenuService;

import java.util.ArrayList;
import java.util.List;


/**
 *  角色 菜单service类
 * @author teli_
 *
 */
@Service("sysRoleMenuService")
@Transactional
public class SysRoleMenuServiceImpl extends ServiceImpl<SysRoleMenuDao, SysRoleMenuEntity> implements SysRoleMenuService {


    @Override
    public List<SysRoleMenuEntity> getMenuByroleIds(ArrayList<String> roleIds) {
        QueryWrapper<SysRoleMenuEntity> queryWrapper = new QueryWrapper<SysRoleMenuEntity>();

        queryWrapper.in("ROLE_ID",roleIds);
        List<SysRoleMenuEntity> menuEntities = this.list(queryWrapper);

        return menuEntities;
    }
}
